package com.ficus.road.maintain.core.model;

import org.apache.commons.lang3.ObjectUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author xiawen yang
 * @date 2022/2/16 下午2:11
 */
public enum AllFactoryTypeEnum {

    BRIDGE_HOTEL("BRIDGE_HOTEL"),
    ROAD_ICE("ROAD_ICE"),
    OVERRUN_CAR("OVERRUN_CAR"),
    OVERPASS("OVERPASS"),   // 下立交
    MECHANICAL_CLEANING("MECHANICAL_CLEANING"),
    ILLEGAL_DIGGING("ILLEGAL_DIGGING"),
    MAINTENANCE_TM_OUT("MAINTENANCE_TM_OUT"),
    BRIDGE_INSPECTION("BRIDGE_INSPECTION");

    private static List<String> list;
    private String type;

    AllFactoryTypeEnum(String type) {
        this.type = type;
    }

    public static List<String> getEnumValueList() {
        if (ObjectUtils.isEmpty(list)) {
            list = new ArrayList<>();
            for (AllFactoryTypeEnum e : AllFactoryTypeEnum.values()) {
                list.add(e.getType());
            }
        }
        return list;
    }

    public String getType() {
        return type;
    }
}
